﻿<?xml version="1.0" encoding="utf-8" ?>
<View
  xmlns="http://mobileui.codeplex.com/v1"
  xmlns:x="http://mobileui.codeplex.com/xaml"
  xmlns:WinForms="System.Windows.Forms,System.Windows.Forms"
  DesiredSize="Unbound">
  
  <View.MenuBar>
    <MenuBar>
      <MenuBar.MenuItems>
        <MenuBarItem Text="Back" Command="{Binding BackCommand}"/>
        <MenuBarItem Text="Randomize" Command="{Binding RandomizeCommand}"/>
      </MenuBar.MenuItems>
    </MenuBar>
  </View.MenuBar>

  <TextElement DesiredSize="Unbound" Foreground="200,200,200" Text="Primitives Demo" Angle="315" AutoSize="True" HorizontalAlignment="Center" VerticalAlignment="Center"/>

  <DrawingPanel x:Name="container" DesiredSize="Unbound" Background="{null}">

    <TextElement Text="Text" DesiredSize="150,60" AutoSize="True">
      <TextElement.Behaviors>
        <DragBehavior/>
      </TextElement.Behaviors>     
    </TextElement>

    <RectangleElement DesiredSize="50,80">
      <RectangleElement.Behaviors>
        <DragBehavior/>
      </RectangleElement.Behaviors>
    </RectangleElement>

    <EllipseElement DesiredSize="40,70">
      <EllipseElement.Behaviors>
        <DragBehavior/>
      </EllipseElement.Behaviors>
    </EllipseElement>

    <RegularPolygonElement NumberOfSides="6" DesiredSize="80,80">
      <RegularPolygonElement.Behaviors>
        <DragBehavior/>
      </RegularPolygonElement.Behaviors>
    </RegularPolygonElement>

    <RegularPolygonElement NumberOfSides="3" DesiredSize="90,70">
      <RegularPolygonElement.Behaviors>
        <DragBehavior/>
      </RegularPolygonElement.Behaviors>
  </RegularPolygonElement>

    <RegularPolygonElement NumberOfSides="8" DesiredSize="80,80">
      <RegularPolygonElement.Behaviors>
        <DragBehavior/>
      </RegularPolygonElement.Behaviors>
  </RegularPolygonElement>

    <Star NumberOfPoints="5" DesiredSize="80,80">
      <Star.Behaviors>
        <DragBehavior/>
      </Star.Behaviors>
    </Star>

    <!-- Just to spice things up - here's some WinForms controls - just don't expect them to rotate! -->
    <!--<FormHost DesiredSize="240,40">
      <FormHost.HostedControl>
        <WinForms:TextBox Text="Hello WinForms" Multiline="True" BackColor="240,255,240"/>
      </FormHost.HostedControl>
    </FormHost>
    <FormHost DesiredSize="240,80">
      <FormHost.HostedControl>
        <WinForms:Panel>
          <WinForms:Panel.Controls>
            <WinForms:RadioButton Checked="True" Text="Is WinForms?" BackColor="255,255,223" Dock="Top" Height="20"/>
            <WinForms:RadioButton Checked="True" Text="Is MobileUI?" BackColor="255,255,223" Dock="Fill"/>
          </WinForms:Panel.Controls>
        </WinForms:Panel>
      </FormHost.HostedControl>
    </FormHost>-->

  </DrawingPanel>
  
</View>